package com.googlecode.struts2scope.scope.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.googlecode.struts2scope.scope.ScopeType;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Scope {

	/**
	 * Which scope should be used to search for the object
	 * 
	 * @return scope
	 */
	public ScopeType type() default ScopeType.REQUEST;
	
	/**
	 * Which key should be used (default to field name)
	 * 
	 * @return key
	 */
	public String key() default "";
}
